package academic.emailClient.control.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;

import academic.emailClient.model.EmailClientModel;
import academic.emailClient.model.entities.Meeting;
import academic.emailClient.view.EmailClientViewInterface;

public class ModifyMeetingButtonActionListener implements ActionListener{
	
	private EmailClientViewInterface view;
	private EmailClientModel model;
	
/**
 * constructor
 * 	
 * @param view
 * @param model
 */
	public ModifyMeetingButtonActionListener(EmailClientViewInterface view, EmailClientModel model) {
		super();
		this.view = view;
		this.model = model;
	}

	/**
	 * Handle Modify Meeting Button Action event
	 */
	@Override
	public void actionPerformed(ActionEvent e) {
		Meeting meeting	= view.getMeetingObject(); 
		model.requestUpdateMeeting(meeting);
		//view.showMergeMeetingForm(meeting, meeting, new ArrayList<String>());
		/*view.displaySuccessfulMeetingUpdate(meeting);
		// Load the Meetings cb
		ArrayList<Meeting> meetings = new ArrayList<Meeting>(model.getMeetings().values());
		view.loadModifyMeetingsCb(meetings);*/
	}
}
